﻿/**
 * Peter
 * Created by: Peter Development Team
 *    http://peter.codeplex.com/
 * 
 * GNU General Public License version 2 (GPLv2)
 *    http://peter.codeplex.com/license
 *
 *  This code is provided on an AS IS basis, with no WARRANTIES,
 *  CONDITIONS or GUARANTEES of any kind.
 *
 **/

using System.Threading.Tasks;
using ICSharpCode.NRefactory.Editor;

namespace Peter.Logic.AvalonEdit
{
   /// <summary>
   /// The base class for code completion.
   /// </summary>
   public abstract class BaseCodeCompletion
   {
      /// <summary>
      /// Gets the completion results for the given document.
      /// </summary>
      /// <param name="document">The document to get completion Results for.</param>
      /// <param name="offset">The offset of the caret.</param>
      /// <param name="controlSpace">True if completion is requested via Ctrl+Space, otherwise false.</param>
      /// <returns>The code completion result.</returns>
      public abstract Task<CodeCompletionResult> GetCompletions (IDocument document, int offset, bool controlSpace);
   }
}
